package com.sys.common.filter;

import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;

import java.util.Arrays;

/**
 * 排除JSON敏感属性
 *
 * @author LGY
 */
public class PropertyPreExcludeFilter extends SimplePropertyPreFilter {
    public PropertyPreExcludeFilter() {
    }

    public PropertyPreExcludeFilter addExcludes(String... filters) {
        Arrays.stream(filters).forEach(filter -> this.getExcludes().add(filter));
        return this;
    }
}
